package com.zzsy.gesturelockdemo;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initUI();
    }

    private void initUI() {
        Button btn_set_lockpattern = findViewById(R.id.btn_set_lockpattern);
        Button btn_verify_lockpattern = findViewById(R.id.btn_verify_lockpattern);
        btn_set_lockpattern.setOnClickListener(this);
        btn_verify_lockpattern.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_set_lockpattern:
                startActivity(new Intent(MainActivity.this,GestureEditActivity.class));
                break;
            case R.id.btn_verify_lockpattern:
                startActivity(new Intent(MainActivity.this,GestureVerifyActivity.class));
                break;
        }
    }
}
